projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5726497
)
center layout: Fix handling of expanding center child
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 1 Jan 2021 16:02:57 +0000
(11:02 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 1 Jan 2021 16:02:57 +0000
(11:02 -0500)
We were not taking spacing into account when adjusting
the size of an expanding center child, causing it to slip
under the end child at times.
Fixes: #3506
gtk/gtkcenterlayout.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcenterlayout.c
b/gtk/gtkcenterlayout.c
index f9fa988ca7ef7ab47150dcec2d599b642af4e12e..b2dee1db0d11a2c8cb5f258365275c7a87b5c046 100644
(file)
--- a/
gtk/gtkcenterlayout.c
+++ b/
gtk/gtkcenterlayout.c
@@
-177,7
+177,7
@@
gtk_center_layout_distribute (GtkCenterLayout *self,
center_pos = size - center_size - end_size - spacing;
else if (center_expand)
{
- center_size = size - 2 *
MAX (start_size, end_size
);
+ center_size = size - 2 *
(MAX (start_size, end_size) + spacing
);
center_pos = (size / 2) - (center_size / 2) + spacing;
}